<%@ page import="org.springside.core.Constants"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="bulletins_portal_label1" var="bulletins_portal_label1"/>
<fmt:message key="bulletins_portal_label2" var="bulletins_portal_label2"/>
<fmt:message key="bulletins_portal_label3" var="bulletins_portal_label3"/>
<fmt:message key="bulletins_portal_label4" var="bulletins_portal_label4"/>
<fmt:message key="workflow_portal_label4" var="workflow_portal_label4"/>
<fmt:message key="bulletins_list_label32" var="bulletins_list_label32"/>

<ff:boxportlet header="${bulletins_portal_label1}">
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left:5px">
	<tr>
		<td valign="top">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tbl_left_ico">
          <c:forEach var="bulletins" items="${bulletinss}" begin="0" end="4"> 
          <tr>
          <td> 
            <a href="#" 
            	onClick='mainJump("/modules/bulletin/bulletins.do?method=show&id=${bulletins.id==null?'':bulletins.id}","<%=Constants.USER_THEME_FRAME %>")'
	            title="${bulletins.title==null?'':bulletins.title}"> 
		            <c:choose> 
		            	<c:when test="${fn:length(bulletins.title==null?'':bulletins.title) >param.y}"> 
			          <c:if test="${bulletins.newTagger eq 'new' }">
	        		   <c:if test="${bulletins.userRead=='0'}">
	        			<b>${fn:substring(bulletins.title==null?'':bulletins.title, 0, param.y)}.... </b>
	        			</c:if>
	        			<c:if test="${bulletins.userRead=='1'}">
	        				${fn:substring(bulletins.title==null?'':bulletins.title, 0, param.y)}.... 
	        			</c:if>
	        		</c:if>
	        		<c:if test="${bulletins.newTagger eq '' ||  bulletins.newTagger eq 'old'}">
	        		  <c:if test="${bulletins.userRead=='1'}">
        					${fn:substring(bulletins.title==null?'':bulletins.title, 0, param.y)}.... 
        				</c:if>
        				  <c:if test="${bulletins.userRead=='0'}">
        				<b>${fn:substring(bulletins.title==null?'':bulletins.title, 0, param.y)}.... </b>
        				</c:if>
	        		</c:if>
	            		</c:when>
		  				<c:otherwise> 
			            	<c:if test="${bulletins.newTagger eq 'new'}">		  				
			    				<c:if test="${bulletins.userRead=='0'}">
			        				<b>${bulletins.title==null?'':bulletins.title} </b>
			        			</c:if>
			        			<c:if test="${bulletins.userRead=='1'}">
			        				${bulletins.title==null?'':bulletins.title}
			        			</c:if>
							</c:if>	    	
							<c:if test="${bulletins.newTagger eq 'old'}">
	    							<c:if test="${bulletins.userRead=='0'}">
			        				<b>${bulletins.title==null?'':bulletins.title} </b>
			        			</c:if>
			        			<c:if test="${bulletins.userRead=='1'}">
			        				${bulletins.title==null?'':bulletins.title}
			        			</c:if>							
							</c:if>	    						 
	        	    	</c:otherwise>
					</c:choose>
	
		            
			</a>
			<c:if test="${bulletins.newTagger eq 'new' }">
	        		<c:if test="${bulletins.userRead=='0'}">
    						<img src="<c:url value="../../themes/${sessionScope.loginUser.theme}/home/images/new.gif"/>">
        				</c:if>
        							
	        </c:if>
	        	<c:if test="${bulletins.newTagger eq '' ||  bulletins.newTagger eq 'old'}">
        		        	  <c:if test="${bulletins.userRead=='0'}">
    						<img src="<c:url value="../../themes/${sessionScope.loginUser.theme}/home/images/new.gif"/>">
        				</c:if>
	        		</c:if>
	        <c:if test="${bulletins.createdate!=null}">
				<font color="#999999">(<fmt:formatDate value="${bulletins.createdate}" pattern="MM-dd HH:mm"/>)</font>
			</c:if>
		   </td>
        </tr>
        </c:forEach> 
        <c:if test="${fn:length(bulletinss==null?'':bulletinss)<1}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(bulletinss==null?'':bulletinss)<2}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(bulletinss==null?'':bulletinss)<3}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(bulletinss==null?'':bulletinss)<4}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(bulletinss==null?'':bulletinss)<5}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
      </table>

      <table width="100%" height="17">
        <tr>
          <td>&nbsp;</td>
          <td width="30" class="tbl_more_ico_td">
          <a href="#" class="link_portlet" onClick='mainJump("/modules/bulletin/bulletins.do?method=list&ec_s_startdate=desc","<%=Constants.USER_THEME_FRAME %>")'
         	title="<fmt:message key="common_more" />"><fmt:message key="common_more" /></a></td>
        </tr>
     </table>
     	</td>
	</tr>
</table>
</ff:boxportlet>    

